package com.tbr.blockchain.p2p;

import java.io.Serializable;

public class Message implements Serializable {

    private int type;

    private String data;

    public Message() {
    }

    public Message( int type, String data) {
        this.type = type;
        this.data = data;
    }
    public Message( int type) {
        this.type = type;
    }

    /**
     * 获取
     * @return type
     */
    public int getType() {
        return type;
    }

    /**
     * 设置
     * @param type
     */
    public void setType(int type) {
        this.type = type;
    }

    /**
     * 获取
     * @return data
     */
    public String getData() {
        return data;
    }

    /**
     * 设置
     * @param data
     */
    public void setData(String data) {
        this.data = data;
    }


    public String toString() {
        return "Message{type = " + type + ", data = " + data + "}";
    }
}
